tsset ccode year

*********Table 1: Descriptive Stats
sum logoutgroups  democracy  minority  exclusionaryid postcoldwar loggdppc totalwars yrs if UCDPcivilwarongoing ==1 
collin logoutgroups  democracy  minority  exclusionaryid postcoldwar loggdppc totalwars yrs if UCDPcivilwarongoing ==1 


*********Table 2: Main Analysis
*Model 1: Base
logit gponset c.l.logoutgroups  yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.logoutgroups  yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.logoutgroups min max)
drop b1 b2 b3 b4 b5 

*Model 2: With controls
logit gponset c.l.logoutgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.logoutgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.logoutgroups min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11

*Model 3: ccode jackknife
logit gponset c.l.logoutgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode) vce(jackknife)
set seed 123456789
estsimp logit gponset l.logoutgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode) vce(jackknife)
setx mean
simqi, fd(pr) changex(l.logoutgroups min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11

*Model 4: Rare events
gen laglogoutgroups=l.logoutgroups 
gen lagdemocracy=l.democracy
gen lagminority=l.minority
gen lagexclusionaryid=l.exclusionaryid
gen lagloggdppc=l.loggdppc
gen lagtotalwars=l.totalwars
relogit gponset laglogoutgroups  lagdemocracy  lagminority  lagexclusionaryid postcoldwar lagloggdppc lagtotalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)

*Model 5: Five year avg
logit gponset c.l.logoutgroups_avg5  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.logoutgroups_avg5  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.logoutgroups_avg5 min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11

*Model 6: using unlogged
logit gponset c.l.outgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.outgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.outgroups min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11

*Model 7: using out-to-in ratio
logit gponset c.l.outgroupratio  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.outgroupratio  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.outgroupratio min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11

*Model 8: Excluded groups at start of war
logit gponset c.l.logoutgroups_start  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.logoutgroups_start  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars yrs yrs2 yrs3 if UCDPcivilwarongoing ==1  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.logoutgroups_start min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11

*Model 9: including peace years
logit gponset c.l.logoutgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars  yrs yrs2 yrs3  , cluster(ccode)
set seed 123456789
estsimp logit gponset l.logoutgroups  l.democracy  l.minority  l.exclusionaryid postcoldwar l.loggdppc l.totalwars  yrs yrs2 yrs3  , cluster(ccode)
setx mean
simqi, fd(pr) changex(l.logoutgroups min max)
drop b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 
